<%--
  Created by IntelliJ IDEA.
  User: 郭宇轩
  Date: 2020/11/16
  Time: 19:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>成功！</title>
    <style type="text/css">
        @import url("../static/css/Header.css");
    </style>
</head>
<%@include file="../MainPage/Header.jsp"%>

<script type="text/javascript">
    function delayURL(url){
        var delay=document.getElementById("time").innerHTML;
        if(delay>0){
            delay--;
            document.getElementById("time").innerHTML=delay;
        }else{
            window.top.location.href=url;
        }
        setTimeout("delayURL('"+url+"')",1000);
    }
</script>

<a style="position: absolute;top: 120px;left: 660px"> 支付成功！</a>

<font style="position: absolute;top: 150px;left: 660px">
    <a href="${pageContext.request.contextPath}/index.jsp">
        <span id="time" style="color: red">5</span>
        秒后跳转回主页
    </a>
</font>

<script type="text/javascript">
    delayURL("${pageContext.request.contextPath}/index.jsp");
</script>

</body>
</html>

